data{
    int<lower=1> N;
    int C[N];
    int VC[N];
    int AVC[N];
}
parameters{
    real a;
    real bVC;
    real bAVC;
}
model{
    vector[N] lp;
    bAVC ~ normal( 0 , 10 );
    bVC ~ normal( 0 , 10 );
    a ~ normal( 0 , 10 );
    for ( i in 1:N ) {
        lp[i] = a + bVC * VC[i] + bAVC * AVC[i];
    }
    C ~ binomial_logit( 1 , lp );
}
generated quantities{
    vector[N] lp;
    real dev;
    dev = 0;
    for ( i in 1:N ) {
        lp[i] = a + bVC * VC[i] + bAVC * AVC[i];
    }
    dev = dev + (-2)*binomial_logit_lpmf( C | 1 , lp );
}
